From d23b21018c99bdddc35cbe249f65edeb5510a6f9 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Wed, 10 Nov 1999 18:47:39 +0000 Subject: [PATCH] Now can handle indexing correctly. Patch from Arjan to do so. 1999-11-10 Jonathan Blandford * src/io-ras.c (OneLineMapped_file): Now can handle indexing correctly. Patch from Arjan to do so. --- gdk-pixbuf/ChangeLog | 5 +++++ gdk-pixbuf/io-ras.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index f8db2df1d8..89733b2212 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +1999-11-10 Jonathan Blandford + + * src/io-ras.c (OneLineMapped_file): Now can handle indexing + correctly. Patch from Arjan to do so. + 1999-11-10 Michael Fulbright * src/io-pnm.c (pnm_ascii_read_scanline): Fixed loading of ASCII PNM diff --git a/gdk-pixbuf/io-ras.c b/gdk-pixbuf/io-ras.c index 0d586a0129..c45f5bb475 100644 --- a/gdk-pixbuf/io-ras.c +++ b/gdk-pixbuf/io-ras.c @@ -27,7 +27,9 @@ Known bugs: * "Indexed" (incl grayscale) sunras files don't work - * 1 bpp sunrasfiles don't work + ( 1999/11/10 - Fixed for non-progressive loading ) + * 1 bpp sunrasfiles don't work yet + * Compressed rasterfiles don't work yet */ @@ -146,9 +148,9 @@ static void OneLineMapped_file(FILE * f, guint Width, guchar * pixels, (void) fread(&DummyByte, 1, 1, f); X = 0; while (X < Width) { - pixels[X * 3] = Map[buffer[X]*3]; - pixels[X * 3+1] = Map[buffer[X]*3]; - pixels[X * 3+2] = Map[buffer[X]*3]; + pixels[X * 3] = Map[buffer[X]]; + pixels[X * 3+1] = Map[buffer[X]+256]; + pixels[X * 3+2] = Map[buffer[X]+512]; X++; } -- 2.30.2